package modele;

import java.util.Collection;
import java.util.HashSet;

/**
 *
 * @author sio
 */
public class Pays {
    private Collection <Dep> lesDeps = new HashSet <Dep> ();
    
    public Pays(){
        lesDeps = DAO.getLesDeps();
    }
    public Collection <Dep> getLesDeps(){
        return lesDeps;
    }
    public Dep getLeDep(String numDep){
        for (Dep unDep : this.lesDeps){
            if (unDep.getNum().equals(numDep)){         //.equals => ==
                return unDep;
            }
        }
        return null;
    }
}
